From: emellor@ewan Date: Mon, 19 Sep 2005 12:44:05 +0000 (+0100) Subject: Use DevController.allocateDeviceID rather than using a local variable. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~16780^2~44^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=60603ce3205e64a71cba6b7d9a75921edd7d8ffb;p=xen.git Use DevController.allocateDeviceID rather than using a local variable. Signed-off-by: Ewan Mellor --- diff --git a/tools/python/xen/xend/server/usbif.py b/tools/python/xen/xend/server/usbif.py index 84cf87e3af..ccc212f885 100644 --- a/tools/python/xen/xend/server/usbif.py +++ b/tools/python/xen/xend/server/usbif.py @@ -25,9 +25,6 @@ from xen.xend.server.DevController import DevController -next_devid = 1 - - class UsbifController(DevController): """USB device interface controller. Handles all USB devices for a domain. @@ -42,9 +39,4 @@ class UsbifController(DevController): def getDeviceDetails(self, _): """@see DevController.getDeviceDetails""" - global next_devid - - devid = next_devid - next_devid += 1 - - return (devid, {}, {}) + return (self.allocateDeviceID(), {}, {})